Skip to content

Conversation

@nytian
Copy link
Collaborator

@nytian nytian commented Sep 30, 2025

When a race condition occurs between RenewMessage and DeleteMessage, and RenewMessage wins, DeleteMessage fails with a MessageGone error. This happens because DeleteMessage may be using a snapshot of the QueueMessage that is already expired or invalid.

After UpdateMessage, a new QueueMessage instance is created, but DeleteMessage might still reference the old instance and its outdated pop receipt. To prevent this, we should always refer to the OriginalQueueMessage, which contains the most up-to-date information.

@nytian nytian changed the title Fix Race Condition between UpdateMessage and DeleteMessage Fix Race Condition between RenewMessage and DeleteMessage Sep 30, 2025
@nytian nytian merged commit a2ffc8b into main Sep 30, 2025
44 checks passed
@nytian nytian deleted the nytian/update-message-visibility branch September 30, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants